M.define(function (customerCertificateUsernameRepository) {
    
    return {
        post: function (customer, certificate, username) {
            if(!isEmpty(username)){
                if (customerCertificateUsernameRepository.check(customer, certificate, username)) {
                    certificate["username"] = username;
                }
            }
        }
    }
})